home *** CD-ROM | disk | FTP | other *** search
/ Nebula 2 / Nebula Two.iso / SourceCode / MiscKit1.7.1 / MiscKitArchive.mbox / mbox / 000135_misckit-reques…aska.et.byu.edu_Thu Feb 17 10:07:54 1994.msg < prev    next >
Internet Message Format  |  1994-10-30  |  7KB

  1. Return-Path: <misckit-request@alaska.et.byu.edu>
  2. Received: from alaska.et.byu.edu by darth.byu.edu (NX5.67d/NX3.0M)
  3.     id AA00598; Thu, 17 Feb 94 10:03:42 -0700
  4. Received: from acs1.byu.edu by alaska.et.byu.edu; Thu, 17 Feb 1994 06:49:34 -0700
  5. From: michael@afs.com
  6. Received: from DIRECTORY-DAEMON by yvax.byu.edu (PMDF V4.3-4 #4169)
  7.  id <01H8ZEE58OYO984JZ2@yvax.byu.edu>; Thu, 17 Feb 1994 06:49:24 MST
  8. Received: from uu5.psi.com by yvax.byu.edu (PMDF V4.3-4 #4169)
  9.  id <01H8ZEDYNTGG02I1B8@yvax.byu.edu>; Thu, 17 Feb 1994 06:49:19 MST
  10. Received: by uu5.psi.com (5.65b/4.0.071791-PSI/PSINet)
  11.  via UUCP; id AA22008 for ; Thu, 17 Feb 94 08:44:40 -0500
  12. Received: from escher by afs.com
  13.  (NX5.67d/3.2.083191-Anderson Financial Systems) id AA13667; Thu,
  14.  17 Feb 94 08:25:18 -0500
  15. Received: by  escher  (NX5.67d/NeXT-2.0) id AA00420; Thu,
  16.  17 Feb 94 08:25:17 -0500
  17. Received: by NeXT.Mailer (1.100)
  18. Received: by NeXT Mailer (1.100)
  19. Date: Thu, 17 Feb 1994 08:25:17 -0500
  20. Subject: Re: Breaking MiscKit into separate "levels" (WAS Re: MiscStringKit?)
  21. To: misckit@byu.edu
  22. Reply-To: Michael_Pizolato@afs.com
  23. Message-Id: <9402171325.AA13667@afs.com>
  24. Content-Transfer-Encoding: 7BIT
  25.  
  26. Robert Nicholson writes
  27. >Don writes
  28. >>Michael Pizolato's division is even finer-grained; I'm afraid that
  29. >>if we break things up too far that it will make the MiscKit too
  30. >>confusing to work with...but I think either scheme suggested would
  31. >>be pretty useful.  How do people prefer to split things up?  We
  32. >>could do a hybrid:
  33. >>
  34. >>0) C functions and macros only
  35. >>1) depends on Object, too
  36. >>2) depends on common classes
  37. >>3) depends on appkit
  38. >>4) adds palette support
  39. >
  40. >Why is it necessary to have Object as a level?
  41. >
  42. >Are classes in level 1 completely portable to over environments?
  43. >
  44. >Why can't we just think of
  45. >
  46. >C functions macros etc.
  47. >Object and Common Classes (ie. non-appkit)
  48. >Appkit
  49. >Palette
  50.  
  51. Yes, I don't think Don's level 1 is necessary.  Look at it from the
  52. other side - List and HashTable "depend only on Object" and so
  53. belong in level 1.  Why then level 2?
  54.  
  55. >>Because of the way palettes are done, (4) might not be really
  56. >>necessary.
  57. >
  58. >Michael, go into a bit more depth as to what you Palette support
  59. >library contains.
  60.  
  61. OK, here's an example.  I implement 'getIBImage' in a category of
  62. Object in zpalettekit.  It returns an image based on the name of
  63. the class, for drawing.  It works for any class, and returns either
  64. an image from a tiff file named after the class that it finds
  65. somewhere in the standard directory list (~/Library/Images,
  66. /LocalLibrary/Images, etc.). If it doesn't find an image named after
  67. the class, it returns the first image it finds walking up the
  68. superclass hierarchy, all the way back to the standard ball picture
  69. for Object.
  70.  
  71. Just by linking this library in your palette and placing and naming
  72. a tiff file correctly, when you instantiate an object in IB the
  73. correct tiff is displayed in the "Objects" view of the IB File
  74. window.  If you create a class Foo and a picture Foo.tiff, instances
  75. of Foo in IB will display Foo.tiff automatically.  If you subclass
  76. Foo with Bar and do not create Bar.tiff, instances of Bar will
  77. display Foo.tiff, automatically.
  78.  
  79. BTW, don't ask me for this method - the design is correct but the
  80. implementation is broken right now. :-(
  81.  
  82. >>And perhapd the IB methods should only be present as a category
  83. >>in the palette project, and not in the library itself anyway.
  84. >>(cf. MiscString)  Does anybody use the IB methods to get info
  85. >>about an object other than from IB? If not, then maybe placing
  86. >>this in the palette projects would be best.
  87. >
  88. >I'm currently using IB categories for each palette for things like
  89. >getIBImage etc etc, but I'd like to hear more about Michael's
  90. >palette support library.
  91.  
  92. That's all I'm willing to say about it right now - it's in no
  93. condition to be released for general consumption, not even close.
  94. It's purpose is to do things like I explained above - functionality
  95. that is general enough to serve any palette.
  96.  
  97. Don't get me started about sharing source code instead of using
  98. libraries or bundles - I have other work to do ;-).
  99.  
  100. >>The build process could produce either "misckit[012]" or just "misckit",
  101. >>or both, depending on flags (that's not asking too much, is it?).
  102. >
  103. >I'd need a to learn a little more about Makefiles in order to do
  104. >it this way, but it shouldn't be too horrid, I think.
  105.  
  106. I think each level should be its own library.  You just add the
  107. ones you need to your PB project.  If you're using level 2, you
  108. also have to use levels 1 & 0.  It's not a big deal because you
  109. only have to set this up once in each project.
  110.  
  111. >>Then there's header organization...perhaps make four headers:
  112. >><misckit/level0.h>, <misckit/level1.h>, <misckit/level2.h>, and
  113. >><misckit/misckit.h>.  The last one just includes all of them; and
  114. >>the level[12].h would include the lower numbered headers.
  115. >
  116. >Well the first hurdle is to form some meaniful names.  I don't
  117. >want to have to refer to a table whenever I see level[0-9].
  118. >However, the one advantage of this naming scheme is that is it
  119. >easy to identify dependencies or at least possible dependencies.
  120. >Perhaps we could use macros to avoid that naming problems.
  121.  
  122. My setup:
  123. /LocalDeveloper/Headers/z
  124. /LocalDeveloper/Headers/zkit
  125. /LocalDeveloper/Headers/zappkit
  126. /LocalDeveloper/Headers/zpalettekit
  127.  
  128. Then you do:
  129.  
  130. #import <zkit/zkit.h>
  131.  
  132. or whichever is appropriate for the level you're using.
  133. <zappkit/zappkit.h> includes <zkit/zkit.h> for you, because zappkit
  134. is built on zkit.
  135.  
  136. How about misc, misckit, miscappkit?  "miscpalettekit" is getting
  137. a bit long, though, for those of you who don't like to type ;-).
  138. I don't mind it.
  139.  
  140. >>>The relevance of this to Robert's comments it that String and
  141. >>>similar non-dependant classes could become part of a 'lightweight'
  142. >>>Level 0 class.  It also addresses the question (in one of the
  143. >>>newsgroups, I think) about what portions of the MiscKit are
  144. >>>applicable to non-NeXT platforms.
  145. >>
  146. >>I think that such a scheme would answer those questions, and
  147. >>provide useful objects for non-NeXT folks.  I think that would be
  148. >>a good thing.  And right now, the AppKit is pretty much intertwined
  149. >>throughout the MiscKit.
  150. >>
  151. >>Now, there is an important thing to note:  The NeXT and GNU Object
  152. >>classes _are_ slightly different; there are object methods in the
  153. >>GNU and in Cox's book that are not in NeXT's object class.  Things
  154. >>like deep/shallow copies, etc.  Perhaps we need a category for
  155. >>NeXT folk to extend things so that we are building on common
  156. >>ground.  That's some food for thought...
  157. >
  158. >A common object protocol is necessary. (Mr Pugh?)
  159.  
  160. This must be resolved, but not my a lowly mortal like myself.
  161.  
  162. >>Oh, and suggested, we'd be better off using mnemonics than level
  163. >>numbers.  Any suggestions here?
  164. >
  165. >Absolutely, but it's important to be able to identify dependicies
  166. >by name.
  167.  
  168. See above.
  169.  
  170. Thanx,
  171. Michael